<?php

//check_username.thtml

if (empty($found)) {
  if ($namelength < 6) {
    echo "Your username should be at least 6 characters.";
  } else {
  	if (preg_match('/^[a-z0-9\_\-]{3,}$/i',$un)) {
    	echo "OK!";
  	} else {
  		echo "Your username cannot have spaces or punctuation.";
  	}
  }
} else {
  echo "Already taken.";
}

?>
